- model_class = Task
.page-header
  %h1= t '.title', :default => model_class.model_name.human.pluralize.titleize
%table.table.table-striped
  %thead
    %tr
      %th= model_class.human_attribute_name(:id)
      %th= model_class.human_attribute_name(:title)
      %th= model_class.human_attribute_name(:description)
      %th= model_class.human_attribute_name(:status)
      %th= model_class.human_attribute_name(:list_id)
      %th= model_class.human_attribute_name(:created_at)
      %th= t '.actions', :default => t("helpers.actions")
  %tbody
    - @tasks.each do |task|
      %tr
        %td= link_to task.id, task_path(task)
        %td= task.title
        %td= task.description
        %td= task.status
        %td= task.list_id
        %td= l task.created_at
        %td
          = link_to t('.edit', :default => t("helpers.links.edit")),
            edit_task_path(task), :class => 'btn btn-default btn-xs'
          = link_to t('.destroy', :default => t("helpers.links.destroy")),
            task_path(task),
            :method => :delete,
            :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
            :class => 'btn btn-xs btn-danger'
= link_to t('.new', :default => t("helpers.links.new")),
  new_task_path,
  :class => 'btn btn-primary'
